Socket
Socket
Sign inDemoInstall

@turf/boolean-disjoint

Package Overview
Dependencies
Maintainers
9
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/boolean-disjoint

turf boolean-disjoint module


Version published
Maintainers
9
Created

What is @turf/boolean-disjoint?

@turf/boolean-disjoint is a module from the Turf.js library that provides geospatial analysis tools. This specific module is used to determine if two geometries are disjoint, meaning they do not share any points in common.

What are @turf/boolean-disjoint's main functionalities?

Check if two geometries are disjoint

This feature allows you to check if two geometries (e.g., points, lines, polygons) do not share any points in common. In this example, two points are checked to see if they are disjoint.

const turf = require('@turf/turf');
const booleanDisjoint = require('@turf/boolean-disjoint');

const point1 = turf.point([2, 2]);
const point2 = turf.point([4, 4]);
const disjoint = booleanDisjoint(point1, point2);
console.log(disjoint); // true

Check if a polygon and a line are disjoint

This feature allows you to check if a polygon and a line are disjoint. In this example, a polygon and a line are checked to see if they do not share any points in common.

const turf = require('@turf/turf');
const booleanDisjoint = require('@turf/boolean-disjoint');

const polygon = turf.polygon([[
  [0, 0], [0, 5], [5, 5], [5, 0], [0, 0]
]]);
const line = turf.lineString([[6, 6], [7, 7]]);
const disjoint = booleanDisjoint(polygon, line);
console.log(disjoint); // true

Other packages similar to @turf/boolean-disjoint

Keywords

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc